#ifndef _MYTASK_H
#define _MYTASK_H
#include "main.h"
#include "tim.h"
#include "kinematics.h"
#include "Servo.h"
#include "LED.h"
#include "OLED.h"
#include "usart.h"
#include "PID.h"
#include <string.h>  // 提供memcpy函数
#include <stdio.h> 
#include"configuration.h"

extern ADC_HandleTypeDef hadc2;

typedef enum {
    servo_wait,
    servo_control,
    servo_G_R
}ServoState;

typedef enum {
    uart_wait,
    uart_ready,
}SerialState;


extern SerialState Serial_state;

void Send_update_angles(void);
void Servo_Control_task(void);
void Gripper_Control_task(void);
void OLED_Show_task(void);
void Serial_Send_task(void);
void LED_Control_task(void);
void ADC_Control_task(void);
void Button_Press_task(void);
BaseType_t Publish_system_state(uint8_t line, uint8_t column,const char *text);
void Error_Handle(const char* step_name);

#endif
